package com.zhengjiang.nacos.storage.service;

import com.zhengjiang.nacos.storage.mapper.StorageMapper;
import com.zhengjiang.nacos.storage.model.Storage;
import io.seata.spring.annotation.GlobalTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("storageService")
public class StorageServiceImpl implements StorageService {

    @Autowired
    private StorageMapper storageMapper;

    @GlobalTransactional(rollbackFor = Exception.class)
    @Override
    public void decryStorage(Storage storage) {
        storageMapper.decryStorage(storage);
        System.out.println(1/0);
    }
}
